<span id="spanT" runat="Server">text</span> 与 <asp:Label ID="spanT" runat="server">区别

来源:百度知道 编辑:UC知道 时间:2024/05/29 11:31:06
<span id="spanT" runat="Server">text</span> 与 <asp:Label ID="spanT" runat="server" Text="text"></asp:Label> 有什么区别?

用起来不是一样么,而且输出到客户端效果也是一样的。

<asp:Label ID="spanT" runat="server" Text="text"></asp:Label>
好比是给属性Text赋了默认值

前者是HTML代码,后者是ASP.NET的控件

一个是客户端代码,是html的代码,后者是asp.net代码,不懂问我!

一个是HTML语言,一个是ASP。NET语言!